import React, { Component } from 'react';
import UseMemo01 from './UseMemo01.jsx';
import UseMemo02 from './UseMemo02.jsx';
import UseMemo03 from './UseMemo03.jsx';
import UseMemo04 from './UseMemo04.jsx';
import UseMemo05 from './UseMemo05.jsx';

export default class Optimize01 extends Component {
	state = {
		mag: 'h111',
		total1: 1,
	}
	add03 = () => {
		this.setState({
			total1: this.state.total1 + 1,
		})
	}
	// 渲染函数
    render() {
    	const total1 = this.state.total1;
    	console.log('Optimize01', 'render');
    	return (
			<div>
			    <div onClick={this.add03}>total1:{total1}</div>
				<UseMemo01></UseMemo01>
				<UseMemo02></UseMemo02>
				<UseMemo03></UseMemo03>
				<UseMemo04 total1={total1}></UseMemo04>
				<UseMemo05></UseMemo05>
			</div>
		);
    }
};
